package com.example.guetdemo.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    //系统错误
    SYSTEM_ERROR(500,"系统出现错误"),
    USERNAME_NOT_EXIST(401,"用户名不存在" ),
    PASSWORD_ERROR(401,"密码错误" ),
    USERNAME_EXIST(409,"用户名已存在" ),
    LOGIN_STATUS_ERROR(401, "登录校验失败,请您先登录"),
    VERIFICATION_CODE_EXPIRED(403, "验证码已过期"),
    VERIFICATION_CODE_EXIST(422,"请不要在120秒内重复发送验证码" ),
    HTTP_HEADER_LOGIN_TYPE_ERROR (422,"请求头login_type字段参数值异常"),
    HTTP_HEADER_LOGIN_TYPE_NOT_FIND(400,"请求头login_type字段缺失" ),
    SCAN_QRCODE_ERROR(401,"二维码扫描认证失败" ),
    QRCODE_EXPIRE(401,"登录二维码过期" );

    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}

